<template>
  <div class="adminList">
    <!-- 模糊查询 -->
    <div class="container">
      <header>
        <!-- 添加账号 -->
        <div>
          <Button @click="add" type="info">
            <i
              class="iconfont icon-add"
              style="font-size: 14px; margin-right: 5px"
            ></i>
          </Button>
        </div>
        <div>
          <Input
            placeholder="请输入登录账号/用户昵称进行查询"
            class="w-input"
            v-model.trim="searchKey"
            @on-keyup.enter="vagueSearch"
            clearable
          />
          <Button
            type="primary"
            icon="ios-search"
            @click="vagueSearch"
          ></Button>
          <Button type="primary" @click="branch">批量导入</Button>
        </div>
      </header>
      <!-- 列表 -->
      <div class="list">
        <Table :columns="list" :data="data1" stripe></Table>
      </div>
      <!-- 分页 -->
      <div class="page">
        <Page
          :total="count"
          :current="pageNo"
          :page-size="pageSize"
          show-total
          show-elevator
          @on-change="loadPage"
          v-show="!flag"
        />
      </div>
      <!-- 账号新增弹窗 -->
      <Modal v-model="addModal" title="账号新增" width="660px" footer-hide>
        <add @showaddModal="showaddModal" />
      </Modal>
      <!-- 账号编辑弹窗 -->
      <!-- <Modal v-model="editModal" title="账号编辑" width="660px" footer-hide>
        <edit @showeditModal="showeditModal" ref="child1" />
      </Modal>
      <Modal v-model="JurisdictionModal" title="用户权限管理" footer-hide>
        <Jurisdiction
          @showJurisdictionModal="showJurisdictionModal"
          ref="child2"
        />
      </Modal>
      <Modal v-model="showConfirmModal" title="清空权限提示" footer-hide>
        <div class="content">
          <p class="tip">是否确定清空用户权限？</p>
          <div slot="footer">
            <div class="btn-group">
              <Button
                class="left btn"
                type="primary"
                :loading="delBtnLoading"
                @click="handleConfirm"
                >确认</Button
              >
              <Button class="right btn" @click="showConfirmModal = false"
                >取消</Button
              >
            </div>
          </div>
        </div>
      </Modal> -->
    </div>
  </div>
</template>

<script>
import add from "./components/add";
export default {
    components: {
        add,
    },
  data() {
    return {
      addModal: false,
    };
  },
  methods: {
    // 批量导入
    branch() {
      this.functionJS.queryNavgationTo(
        this,
        "/index/doctorOperation/doctorregister/batchone",
        {
          pageNo: this.pageNo,
        }
      );
    },
    // 添加角色
    add() {
      this.addModal = true;
    },

    showaddModal() {
      this.addModal = false;
      // this.loadUserData();
    },
  },
};
</script>
<style lang="less" scoped>
.adminList {
  padding: 10px;
  width: 100%;
  background: #ffffff;
  box-sizing: border-box;
  .container {
    width: 100%;
    margin: 0 auto;
    header {
      width: 100%;
      height: 40px;
      display: flex;
      .w-input {
        width: 250px;
        margin: 0 10px;
      }
    }
    .list {
      width: 100%;
      margin: 10px 0;
    }
  }
  .page {
    text-align: center;
    margin-top: 20px;
  }
}
/deep/ .ivu-modal-wrap {
  .ivu-modal {
    float: right !important;
    background-color: #fff;
    border-radius: 10px;
    top: 0px;
    height: 100%;
    overflow-x: hidden;
  }
  .btn-group {
    padding-top: 10px;
    text-align: center;
    .left {
      margin-right: 20px;
    }
    .right {
      margin-left: 20px;
    }
  }
  .content {
    text-align: center;
    .tip {
      padding-bottom: 10px;
    }
  }
}
</style>
